<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateFuncionarioTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_idFuncionario}" for="idFuncionario" />
                    <h:inputText id="idFuncionario" value="#{funcionarioController.selected.idFuncionario}" title="#{bundle.CreateFuncionarioTitle_idFuncionario}" required="true" requiredMessage="#{bundle.CreateFuncionarioRequiredMessage_idFuncionario}"/>
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_nome}" for="nome" />
                    <h:inputText id="nome" value="#{funcionarioController.selected.nome}" title="#{bundle.CreateFuncionarioTitle_nome}" required="true" requiredMessage="#{bundle.CreateFuncionarioRequiredMessage_nome}"/>
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_estadoCivil}" for="estadoCivil" />
                    <h:inputText id="estadoCivil" value="#{funcionarioController.selected.estadoCivil}" title="#{bundle.CreateFuncionarioTitle_estadoCivil}" required="true" requiredMessage="#{bundle.CreateFuncionarioRequiredMessage_estadoCivil}"/>
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_morada}" for="morada" />
                    <h:inputText id="morada" value="#{funcionarioController.selected.morada}" title="#{bundle.CreateFuncionarioTitle_morada}" required="true" requiredMessage="#{bundle.CreateFuncionarioRequiredMessage_morada}"/>
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_codFunc}" for="codFunc" />
                    <h:inputText id="codFunc" value="#{funcionarioController.selected.codFunc}" title="#{bundle.CreateFuncionarioTitle_codFunc}" />
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_foto}" for="foto" />
                    <h:inputText id="foto" value="#{funcionarioController.selected.foto}" title="#{bundle.CreateFuncionarioTitle_foto}" />
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_numSS}" for="numSS" />
                    <h:inputText id="numSS" value="#{funcionarioController.selected.numSS}" title="#{bundle.CreateFuncionarioTitle_numSS}" />
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_titulo}" for="titulo" />
                    <h:inputText id="titulo" value="#{funcionarioController.selected.titulo}" title="#{bundle.CreateFuncionarioTitle_titulo}" />
                    <h:outputLabel value="#{bundle.CreateFuncionarioLabel_dataNasc}" for="dataNasc" />
                    <h:inputText id="dataNasc" value="#{funcionarioController.selected.dataNasc}" title="#{bundle.CreateFuncionarioTitle_dataNasc}" required="true" requiredMessage="#{bundle.CreateFuncionarioRequiredMessage_dataNasc}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{funcionarioController.create}" value="#{bundle.CreateFuncionarioSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{funcionarioController.prepareList}" value="#{bundle.CreateFuncionarioShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateFuncionarioIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
